using IQIGame.Onigao.Game;
using IQIGame.Onigao.Logic;

namespace IQIGame.Onigao.GamePlay
{
    public class CFSMCondtriggered : BaseConditionFunc
    {
        protected override void OnInit()
        {

        }

        public override bool Check()
        {
            if (paramList.Count != 1 || paramList[0] is not string)
            {
                LogicLog.LogError("触发条件判断错误，参数错误。参数：" + string.Join(',', paramList));
                return false;
            }
            return fsm.triggerData.Contains((string)paramList[0]);
        }

        public override void OnReset()
        {
            base.OnReset();
        }
    }
}
